home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-1097 / AMOSLIST / text0029.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.6 KB  |  68 lines

  1. On 01-Oct-97, mtl.wberg@swipnet.se wrote:
  2. >Is it possible to make amos 2 change lines with another assii value than
  3. >then MS-DOS chr$(13)?
  4.  
  5. Sure is...
  6.  
  7. >When i read a text file without that i will recive an error mezz
  8. >(input to long), 
  9. >Ex
  10. >open in 1,a$
  11. >repeat
  12. >input #1,b$
  13. >until pof(1)=lof(1)
  14.  
  15. Nah! You don't wanna do it like that!
  16.  
  17. F$="yourtextfilepath"
  18. BNK=10 : Rem Any Bank
  19. Open in 1,F$
  20. L=Lof(1)
  21. Close 1
  22. Reserve As Data BNK,L
  23. Bload F$,Start(BNK)
  24.  
  25. ST=Start(BNK)
  26.  
  27. Do
  28.   Exit If ST=>Length(BNK) : Rem I think this may be wrong!!!
  29.   A$=Peek$(ST,79,Chr$(10)) : Rem 79 chars and Chr$(10) checked.
  30.   Add ST,Len(A$)+1
  31.   Print A$
  32. Loop
  33.  
  34. The  above  is  just  from  my  memory, so it may not be 100%! You can
  35. change the Chr$(10) to Chr$(13) if reading MS-DOS files.
  36.  
  37. If  that's  not  what  your after, I'm sure that the LDos Ext has some
  38. commands to change the EOL character search.
  39.  
  40. eg.
  41.  
  42. Lset Eoln 13 : Rem MS-DOS check
  43.  
  44. or
  45.  
  46. Lset Eoln 10 : Rem Amiga-DOS check
  47.  
  48. Check out the LDos dox for more great string handling....
  49.  
  50. Hope this has helped :)
  51.  
  52. Andy Gee!
  53.  
  54. -- 
  55.      _             _        _         _
  56.     _)\        ____)\      _)\   _____)\   #cONTACT mE fOR mORE iNFO#
  57.    /o° \      /o°____)    /o° \ /o°_____)  #oN aREA51 rELEASES aLSO.#
  58.   //    \    // /  __    //    \\\ \____ 
  59.  /.  O   \  /. /___\ \  /.  O   \\____  \  *andy@agasinc.demon.co.uk*
  60. /    _    \/   Y   Y  \/    _    \ ___\\ \
  61. \ __/ \___/\_________ /\___/ \ __//______/        Team *AMOS*
  62.  Y                   Y        Y   Y      
  63. L8R                  :        °   ·            #cOMING sOON'ish#
  64.  .     Andy Gibson (AGAS Productons)           *Roswell Gfx Adv*
  65.  ·         -=<(aka SKiDZ/A51)>=-                      9T7
  66.  
  67.  
  68.